<?php
/**
 * Created by PhpStorm.
 * User: DELL
 * Date: 2017/3/11
 * Time: 9:38
 */
$this->title = '商品选择';
use yii\helpers\Html;
use yii\grid\GridView;
use common\models\Goods;

echo GridView::widget([
    'dataProvider' => $dataProvider,
    'columns' => [
        'id',
        'goods_name',
        'life',
        [
            'attribute' => 'create_time',
            'format' =>  ['date', 'php:Y-m-d H:i:s'],
        ],
        [
            'class' => 'yii\grid\ActionColumn',
            'header' => '操作',
            'template' => '{view}',
            'headerOptions' => ['width' => '64', 'class' => 'padding-left-5px',],
            'contentOptions' => ['class' => 'padding-left-5px'],
        ],
    ],
]);

?>